-- GENERATED SPELL FOR [Grandmaster Vorpil] --


function spell0_18732(pUnit, Event) --@Banish,n/a--
pUnit:FullCastSpellOnTarget(38791,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18732', 8403, 1)
end

function spell1_18732(pUnit, Event) --@Draw Shadows,Self--
pUnit:FullCastSpellOnTarget(33563,pUnit)
pUnit:RegisterEvent('Sorts_18732', 1000, 1)
end

function spell2_18732(pUnit, Event) --@Rain of Fire,Self--
pUnit:FullCastSpellOnTarget(33617,pUnit)
pUnit:RegisterEvent('Sorts_18732', 6000, 1)
end

function spell3_18732(pUnit, Event) --@Rain of Fire,Self--
pUnit:FullCastSpellOnTarget(39363,pUnit)
pUnit:RegisterEvent('Sorts_18732', 6000, 1)
end

function spell4_18732(pUnit, Event) --@Shadow Bolt Volley,Self--
pUnit:FullCastSpellOnTarget(33841,pUnit)
pUnit:RegisterEvent('Sorts_18732', 862, 1)
end

function Sorts_18732(pUnit, Event)
local choix_sorts_18732 = math.random(0, 4)
if choix_sorts_18732 == 0 then
pUnit:RegisterEvent('spell0_18732', 1, 1)
end
if choix_sorts_18732 == 1 then
pUnit:RegisterEvent('spell1_18732', 1, 1)
end
if choix_sorts_18732 == 2 then
pUnit:RegisterEvent('spell2_18732', 1, 1)
end
if choix_sorts_18732 == 3 then
pUnit:RegisterEvent('spell3_18732', 1, 1)
end
if choix_sorts_18732 == 4 then
pUnit:RegisterEvent('spell4_18732', 1, 1)
end
end

function mob18732_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18732', math.random(1500, 3000), 1)
end

function mob18732_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18732_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18732_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18732, 1, 'mob18732_Action')
RegisterUnitEvent(18732, 2, 'mob18732_Leave')
RegisterUnitEvent(18732, 3, 'mob18732_Kill')
RegisterUnitEvent(18732, 4, 'mob18732_Die')
